package br.com.petsis.auditoria;

import org.hibernate.cfg.Configuration;
import org.hibernate.event.Initializable;
import org.hibernate.event.PreDeleteEvent;
import org.hibernate.event.PreDeleteEventListener;
import org.hibernate.event.PreInsertEvent;
import org.hibernate.event.PreInsertEventListener;
import org.hibernate.event.PreLoadEvent;
import org.hibernate.event.PreLoadEventListener;
import org.hibernate.event.PreUpdateEvent;
import org.hibernate.event.PreUpdateEventListener;

public final class HibernateAuditLogListener implements 
	PreDeleteEventListener, PreInsertEventListener, PreUpdateEventListener,
		PreLoadEventListener, Initializable {

	@Override
	public void initialize(Configuration arg0) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void onPreLoad(PreLoadEvent arg0) {
		System.out.println("TESTE DE LOAD");
	}

	@Override
	public boolean onPreUpdate(PreUpdateEvent arg0) {
		System.out.println("TESTE DE UPDATE");
		return false;
	}

	@Override
	public boolean onPreInsert(PreInsertEvent arg0) {
		System.out.println("TESTE DE INSERT");
		return false;
	}

	@Override
	public boolean onPreDelete(PreDeleteEvent arg0) {
		// TODO Auto-generated method stub
		return false;
	}

}
